<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>编辑合同</title>
		<%@ include file="/include/resources.jsp" %>
	</head>
	<body>
		<script type="text/javascript" src="msi/contract/contract.js"></script>
		<div style="padding:5px;background:#fafafa;border-bottom:1px solid #eee;">
			<table cellpadding="0" cellspacing="0" style="width:100%">
				<tr>
					<td>
						<s:if test="operator==null">
							<a id="btn-submit1" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="javascript:submitContract(1)">保存</a>
						</s:if>
						<s:elseif test="operator==1">
							<s:if test='contract.autFlag=="N"'>							
								<a id="btn-submit1" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="javascript:submitAut(1)">审核</a>
								<s:if test='contract.contractState=="P"'>
									<a id="btn-submit1" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="javascript:channelContract(1)">作废</a>
								</s:if>
							</s:if>
						</s:elseif>
						<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="javascript:$('#contractDialog').dialog('close')">关闭</a>
					</td>
				</tr>
			</table>
		</div>
		<form action="" method="post" id="contractForm">
			<input type="hidden" id="contractId" name="contract.contractId" value='<s:property value="contract.contractId"/>'/>
			<input type="hidden" name="contract.custId" value='<s:property value="contract.custId"/>'/>
			<div style="padding:10px;">
				<div style="padding-left:5px;padding-right: 5px">
					<table cellpadding="0" cellspacing="3" >
						<tr>
							<th>签约客户：</th>
							<td colspan="3"><input id="signCustID"  type="text" name="contract.signCustId" value='<s:property value="contract.signCustId"/>'/></td>
						</tr>
						<tr>
							<th>合同编号：</th>
							<td><input type="text" name="contract.contractCode" value='<s:property value="contract.contractCode"/>'/></td>
							<th>合同名称：</th>
							<td><input type="text" name="contract.contractTitle" value='<s:property value="contract.contractTitle"/>'/></td>
						</tr>
						<tr>
							<th>签约日期:</th>
							<td><input type="text" editable="false" class="easyui-datebox" name="contract.signDate" value='<s:property value="contract.signDate"/>'/></td>
							<th>生效日期:</th>
							<td><input type="text" editable="false" class="easyui-datebox" name="contract.effectiveDate" value='<s:property value="contract.effectiveDate"/>'/></td>
						</tr>
						<tr>
							<th>失效日期:</th>
							<td colspan="3"><input editable="false" class="easyui-datebox" type="text" name="contract.expirationDate" value='<s:property value="contract.expirationDate"/>'/></td>
						</tr>
						<tr>
							<th>合同描述:</th>
							<td colspan="3"><input type="text" name="contract.contractDesc" value='<s:property value="contract.contractDesc"/>'/></td>
						</tr>
					</table>
				</div>
			</div>
		</form>
		<script type="text/javascript">
			$(function(){
				$('#signCustID').customerselect({
					url:'searchCustomer.do',
					editable:false
				});
				$('#signCustID').combogrid('setText','${contract.custName}');
			});
		</script>
	</body>
</html>